package com.gosophia.conferenceManagement.starting.dao;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Component;
import org.springframework.util.Assert;

import com.gosophia.commons.persistence.BaseDao;
import com.gosophia.conferenceManagement.starting.entity.ConferenceApplicationJobData;

/**
 * 会议发起暂存DAO
 * 
 * @author tianchunyu
 * 
 */
@Component
public class ConferenceStartingDAO extends
		BaseDao<ConferenceApplicationJobData, Long> {

	/**
	 * 查找最新的会议申请信息
	 * 
	 * @param missionId
	 *            会议关联任务id
	 * @return 查找到的最新的会议申请信息
	 */
	public ConferenceApplicationJobData getNewConferenceApplicationJobData(
			Long missionId) {
		Assert.isTrue(missionId != null, "任务id不能为null");
		return this
				.getUniqueByNamedQuery(
						"conferenceApplicationJobData.getNewConferenceApplicationJobData",
						missionId,missionId);
	}
}
